<template>
    <div class="pageRight">
        <div class="pageRight-title">投票记录</div>
        <div class="pageRight-cont">
            <el-table
                    :data="tableData"
                    border
                    style="width: 100%">
                <el-table-column
                        inline-template
                        label="投票时间"
                        width="180">
                    <div>
                        <el-icon name="time"></el-icon>
                        <span style="margin-left: 10px">{{ row.date }}</span>
                    </div>
                </el-table-column>
                <el-table-column
                        inline-template
                        label="投票用户"
                        width="180">
                    <div>
                        <el-icon name="time"></el-icon>
                        <span style="margin-left: 10px">{{ row.username }}</span>
                    </div>
                </el-table-column>
                <el-table-column
                        inline-template
                        label="openid">
                    <div>
                        <el-icon name="time"></el-icon>
                        <span style="margin-left: 10px">{{ row.openid }}</span>
                    </div>
                </el-table-column>
                <el-table-column
                        inline-template
                        label="活动名称">
                    <div>
                        <el-icon name="time"></el-icon>
                        <span style="margin-left: 10px">{{ row.votename }}</span>
                    </div>
                </el-table-column>
                <el-table-column
                        inline-template
                        label="受票项">
                    <div>
                        <el-icon name="time"></el-icon>
                        <span style="margin-left: 10px">{{ row.selectname }}</span>
                    </div>
                </el-table-column>
                <el-table-column
                        :context="_self"
                        inline-template
                        label="操作">
                    <div>

                        <el-button
                                size="small"
                                type="danger"
                                @click="handleDelete($index, row)">
                            删除
                        </el-button>
                    </div>
                </el-table-column>
            </el-table>

        </div>

    </div>
</template>
<style>

</style>
<script>
    export default {
    data() {
      return {
        tableData: [{
          date: '2016-05-02',
          username: '王小虎',
          openid:'asdasdaafsdfsdfsdfsdfdf',
          votename:'出彩宝贝大赛',
          selectname: '陈译彬'
        }]
      }
    },
    methods: {
      handleEdit(index, row) {
        console.log(index, row);
      },
      handleDelete(index, row) {
        console.log(index, row);
      }
    }
  }
</script>
